package com.zushiye.order.mapper;

import com.zushiye.order.model.UserInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
public interface UserInfoMapper {

    @Select("select * from user where user_name = #{user_name}")
    UserInfo getUser(String user_name);

    @Insert("insert into user(user_name, pwd) " +
            "values(#{user_name}, #{pwd})")
    int insert(UserInfo info);

    @Select("select count(*) from user where user_name = #{user_name}")
    int getUserCount(String user_name);

    @Delete("delete from user where user_name = #{user_name}")
    int deleteUser(String user_name);

/*
    @Update("UPDATE sys_dict SET dict_key=#{dictKey}, dict_value=#{dictValue}, label=#{label}, " +
            "username=#{username}, create_time=#{createTime}, comment=#{comment} WHERE id=#{id}")
    void updateSysDict(SysDict sysDict);

    @Delete("DELETE FROM sys_dict WHERE id = #{id}")
    void deleteSysDict(Long id);*/

}
